#!/bin/bash

if [ $1 == 'start' ]
then
        java -jar -Xms512m -Xmx512m -Dspring.config.location=target/resources/ target/finance-pay.jar > /var/finance-pay.log 2>&1 &
elif [ $1 == 'stop' ]
then
        ps -ef |  grep -n 'java -jar .*finance-pay.jar' | grep -v grep | awk '{print $2}' | xargs kill -9
elif [ $1 == 'ps' ]
then
        ps -ef | grep -n 'java -jar .*finance-pay.jar' | grep -v grep
else
        echo "参数错误"
fi
